﻿#ifndef BREAKDIALOG_H
#define BREAKDIALOG_H

#include <QDialog>
#include "config.h"

namespace Ui {
class BreakDialog;
}

class BreakDialog : public QDialog
{
    Q_OBJECT

public:
    explicit BreakDialog(QWidget *parent = nullptr, int breakTime=10);
    ~BreakDialog();
    void setPostoff(bool enable);

protected:
    void closeEvent(QCloseEvent *event) override;

private:
    Ui::BreakDialog *ui;
    QTimer *timer;
    int curStep=0;
    int breakSteps=10;

    Config &config = Config::get_instance();
private slots:
    void updateOneSec();
    void on_pushButton_clicked();
};

#endif // BREAKDIALOG_H
